// > https://cloud.tencent.com/developer/article/2362244?areaId=106001
export const registerDirective = (app) => { 
    app.directive('focus', {
        mounted(el) {
            el.focus()
        }
    })
  
    app.directive('position', {
        mounted(el, binding) {
        // 设置弹框的top位置
            el.style.position = 'absolute'
            el.style.top = binding.value.top + 'px'
            el.style.left = binding.value.left + 'px'
        }
    })
}

